
var path =require('path')
module.exports = {
    mode: 'production',//production development
    // entry: path.resolve(__dirname,'./index.js'),
    // output,
    target: 'node',
    resolve: {
        modules: [
            path.resolve('./src'),
            'node_modules',
         ],
         extensions: ['*', '.js', '.scss', '.css', '.json'],
         alias: {
             containers: path.resolve(__dirname, './src/scripts/containers'),
             components: path.resolve(__dirname, './src/scripts/components'),
        },
    },
    module: {
        rules: [
            {
                test: /\.html$/,
                use: 'html-loader',
            },
            {
                test: /\.js$/,
                type:'javascript/auto',
                exclude: path.resolve(__dirname,'node_modules'),
                use: 'babel-loader',
            },
            {
                test: /\.json$/,
                type:'javascript/auto',
                exclude: path.resolve(__dirname,'node_modules'),
                use: 'json-loader',
            }
            // {
            //     test: /\.css$/,
            //     use: ExtractTextWebapckPlugin.extract({
            //         use: 'css-loader'
            //     })
            // },
            // {
            //     test: /\.scss$/,
            //     use: sassExtract.extract({ use: ['css-loader', 'sass-loader'] })
            // },
            // {
            //     test: /\.(otf|eot|svg|ttf|woff2?)(\?.*)?$/,
            //     loader: 'url-loader',
            //     query: {
            //         limit: 10000,
            //         name: 'fonts/[name].[hash:7].[ext]',
            //     },
            // },
            // {
            //     test: /\.(png|jpe?g|gif|svg)(\?.*)?$/,
            //     loader: 'url-loader',
            //     query: {
            //         limit: 15000,
            //         name: 'images/[name].[hash:7].[ext]',
            //     },
            // },
        ]
    },
    node: {
        fs: 'empty',
      }

}